/**
 * index 用js
 * @author yulipu
 */
var yLoader = new YLoader();

/**
 * animate banner
 */
yLoader.use(Y._CDN_ + "/js/AnimateBanner.js", function(){
	var obj = document.getElementById('bannerbg');
	var anim = new AnimateBanner(obj);
	var eles = obj.getElementsByTagName('img');
	for(var i=0; i<eles.length; i++) {
		anim.setImg(eles[i].src);
	}
	
	anim.start();
});

/**
 * 新闻图片切换
 */
yLoader.use(Y._CDN_ + '/js/SwitchImg.js', function() {
	var imgObj = document.getElementById('ySwitchImg');
	var titleObj = document.getElementById('ySwitchImgTitle');
	var handlers = document.getElementById('ySwitchImgHandler').getElementsByTagName('i');
	if(handlers.length > 0) {
		new SwitchImg().init(imgObj, titleObj, handlers);
	}
});

/**
 * 楼层内容切换
 */
yLoader.use(Y._CDN_ + '/js/FloorJQ.js', function(){
	var firstFloor = new FloorJQ('firstFloor').init();
	var secondFloor = new FloorJQ('secondFloor').init();
});


/**
 * list show hide
 */
yLoader.use(Y._CDN_ + '/js/ListShowHide.js', function(){
	new ListShowHide('floorRightList').init();
});

